Skip to content

ci: move lint job to reusable golangci-lint workflow - #53

Open
dwisiswant0 wants to merge 1 commit into
mainfrom
dwisiswant0/ci/move-lint-job-to-reusable-golangci-lint-workflow
Open

dwisiswant0 wants to merge 1 commit into
mainfrom
dwisiswant0/ci/move-lint-job-to-reusable-golangci-lint-workflow

Conversation

@dwisiswant0

Copy link
Copy Markdown
Member

Replace the lint job in build-test.yml with a call to
golangci-lint.yaml, the reusable workflow in projectdiscovery/workflows.
On pull requests it reports only issues on lines the pull request
changes, so a pull request no longer fails on issues it didn't add, such
as ones a new golangci-lint release starts reporting. Push and manual
runs lint the whole module.

The job no longer skips bot pull requests, so the build job, which needs
it, runs for Dependabot pull requests again.

Rename build-test.yml to tests.yml and the workflow from Build Test to
Tests, matching dsl's lint and test workflow.

tests.yml now also runs on push to main. A cache saved by a pull_request
run is visible only to that pull request, so the Go and golangci-lint
caches never carried over from one pull request to the next. A push run
saves them on main, where every pull request can restore them. The build
job runs on those pushes too.

Closes: #52

Replace the lint job in build-test.yml with a call to
golangci-lint.yaml, the reusable workflow in projectdiscovery/workflows.
On pull requests it reports only issues on lines the pull request
changes, so a pull request no longer fails on issues it didn't add, such
as ones a new golangci-lint release starts reporting. Push and manual
runs lint the whole module.

The job no longer skips bot pull requests, so the build job, which needs
it, runs for Dependabot pull requests again.

Rename build-test.yml to tests.yml and the workflow from Build Test to
Tests, matching dsl's lint and test workflow.

tests.yml now also runs on push to main. A cache saved by a pull_request
run is visible only to that pull request, so the Go and golangci-lint
caches never carried over from one pull request to the next. A push run
saves them on main, where every pull request can restore them. The build
job runs on those pushes too.

Closes: #52
Signed-off-by: Dwi Siswanto <git@dw1.io>
@dwisiswant0 dwisiswant0 self-assigned this Dec 3, 2026
@dwisiswant0
dwisiswant0 requested a review from Mzack9999 December 3, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move the lint job to the reusable golangci-lint workflow

1 participant